﻿CREATE PROCEDURE [dbo].[Sp_select_moviedetailed]
	@pidpelicula int
AS
select tp.idpelicula,tp.nompelicula,tp.sipnosis,tp.estrenopeli,tp.trailerlink, count(*) as c from tbpelicula tp,
 tbvideopelicula where tp.idpelicula=@pidpelicula and tp.idpelicula=tbvideopelicula.idpelicula and 
 tbvideopelicula.estadovideo=1 group by tp.idpelicula,tp.nompelicula,tp.sipnosis,tp.trailerlink,
tp.estrenopeli;

select nombrecategoria from tbcategoriapeli, tbclasificacionpeli where tbcategoriapeli.idcategoriapeli
=tbclasificacionpeli.idcategoriapeli and tbclasificacionpeli.idpelicula=@pidpelicula

select nomactor,personaje from tbactor, tbparticipacionpeliac where tbactor.idactor=tbparticipacionpeliac.idactor
 and idpelicula=@pidpelicula
RETURN 0
